<a href='http://github.com/angular/angular.js/edit/master/docs/content/error/$location/ihshprfx.ngdoc' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit">&nbsp;</i>Improve this doc</a>


<h1>Error: $location:ihshprfx
  <div><span class='hint'>Missing Hash Prefix</span></div>
</h1>

<div>
    <pre class="minerr-errmsg" error-display="Invalid url "{0}", missing hash prefix "{1}".">Invalid url "{0}", missing hash prefix "{1}".</pre>
</div>

<h2>Description</h2>
<div class="description">
  <p>This error occurs when <a href="api/ng/service/$location">$location</a> service is configured to use a hash prefix but this prefix was not present in a url that the <code>$location</code> service was asked to parse.</p>
<p>For example if you configure <code>$location</code> service with prefix <code>&#39;!&#39;</code>:</p>
<pre><code>myApp.config(function($locationProvider) {
  $locationProvider.prefix(&#39;!&#39;);
});</code></pre>
<p>If you enter the app at url <code>http:/myapp.com/#/myView</code> this error will be throw.</p>
<p>The correct url for this configuration is <code>http:/myapp.com/#!/myView</code> (note the <code>&#39;!&#39;</code> after <code>&#39;#&#39;</code> symbol).</p>

</div>


